ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
  if html_tag =~ /\<label/
    "<div class=\"field_with_errors\">#{html_tag}</div>".html_safe
  else
    "<div class=\"field_with_errors\">#{html_tag}<div class=\"error_message\">#{instance.error_message.join(', ')}</div></div>".html_safe
  end
end